local yanlv = fk.CreateSkill {
  name = "ls__yanlv",
  tags = { Skill.Compulsory }
}

Fk:loadTranslationTable{
  ["ls__yanlv"] = "严律",
  [":ls__yanlv"] = "锁定技，每项各一次：当有角色于回合内造成点数大于1的伤害后/于回合外回复体力后，你令“陷阵”发动次数上限/目标上限+1。",
  ["@@yanlv_damage"] = "严律：伤害",
  ["@@yanlv_recover"] = "严律：回复",

  ["$ls__yanlv1"] = "勇力足以壮征程，且留此酒宴庆功！",
  ["$ls__yanlv2"] = "壮士何须恋黄封，敌血犹较酒香浓！",
}

yanlv:addEffect(fk.Damage, {
  anim_type = "special",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(yanlv.name) and player:getMark("@@yanlv_damage") == 0 then
      return player.room.current == target and data.damage > 1
    end
  end,
  on_use = function(self, event, target, player, data)
    player.room:addPlayerMark(player, "@@yanlv_damage")
  end,
})

yanlv:addEffect(fk.HpRecover, {
  anim_type = "special",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(yanlv.name) and player:getMark("@@yanlv_recover") == 0 then
      return player.room.current ~= target
    end
  end,
  on_use = function(self, event, target, player, data)
    player.room:addPlayerMark(player, "@@yanlv_recover")
  end,
})


return yanlv